<template>
	<view>
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
			<block slot="content">
				2020-2021 第一学期 其中考试
			</block>
		</cu-custom>
		<a-scroll :request="get" ref="aScroll">
			<template #item="{row:x,index}">
				<a-list :value="x">
					<template #bottom-right>
						<text class="iconfont icon-duanxin">A</text>
					</template>
					<template #default="{row}">
						<view style="color:red;font-size: 20px;">加饼图</view>
					</template>
				</a-list>
			</template>
		</a-scroll>
	</view>
</template>

<script>
	export default {
		//上拉触底
		onReachBottom() {
			this.$refs.aScroll.lower();
		},
		//下拉刷新
		onPullDownRefresh() {
			this.$refs.aScroll.get(true).then(res => {
				uni.stopPullDownRefresh();
			});
		},
		data() {
			return {
				
			}
		},
		methods: {
			get(parm = {}) {
				const data = new Array(15).fill({
					name: "数学",
					phone: "122分",
					sonTitle:"参考人数：120人",
					img:require('./1.png')
				});
				console.log('请求：' + JSON.stringify({
					...parm
				}));
				return new Promise(r => {
					setTimeout(e => {
						r({
							total: 200,
							data
						})
					}, 1000);
				});
			}
		}
	}
</script>

<style>

</style>
